<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
	<ui:include src="template/header.xhtml" />
</h:head>
<body>
	<h:form>
		<ui:include src="template/banner.xhtml" />
		<ui:include src="template/links.xhtml" />

		<center>
			<h:dataTable id="accounts" captionClass="list-caption"
				columnClasses="list-column-left, list-column-center,
                          list-column-right, list-column-right"
				footerClass="list-footer" headerClass="list-header"
				rowClasses="list-row-even, list-row-odd"
				styleClass="list-background" summary="#{bundle.AccountList}"
				value="#{customer.accounts}" var="ad">

				<h:column>
					<f:facet name="header">
						<h:outputText value="#{bundle.AccountName}" />
					</f:facet>
					<h:commandLink value="#{ad.description}" immediate="true"
						action="#{accountHistoryBean.submit}">
						<f:param name="accountId" value="#{ad.accountId}" />

					</h:commandLink>
				</h:column>
				<h:column>
					<f:facet name="header">
						<h:outputText value="#{bundle.AccountId}" />
					</f:facet>
					<h:outputText value="#{ad.accountId}" />
				</h:column>
				<h:column>
					<f:facet name="header">
						<h:outputText value="#{bundle.AccountBalance}" />
					</f:facet>
					<h:outputText value="#{ad.balance}">
						<f:convertNumber type="currency" currencySymbol="$" />
					</h:outputText>
				</h:column>
				<h:column>
					<f:facet name="header">
						<h:outputText value="#{bundle.AccountCredit}" />
					</f:facet>
					<h:outputText value="#{ad.remainingCredit}">
						<f:convertNumber type="currency" currencySymbol="$" />
					</h:outputText>
				</h:column>
			</h:dataTable>
		</center>
	</h:form>
</body>
</html>
